//
//  MyStrokesController.swift
//  CarShare
//
//  Created by Pro on 2017/12/26.
//

import UIKit


private let MyStrokeCellID = "MyStrokeCellID"

class MyStrokesController: BaseController {
    
    @IBOutlet weak var StrokeTableView: UITableView!
    
    
    
    func configUI() -> Void {
        //        NaviView.backgroundColor = APPCOLOR
        
    }
    
    @IBAction func backAction(_ sender: UIButton) {
        self.navigationController?.pushViewController(PersonalController(), animated: false)
    }
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        navigationController?.navigationBar.isHidden = false
    }
    override func viewDidLoad() {
        super.viewDidLoad()
        title = "我的行程"
        configUI()
        configTableView()
        
    }
    
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    func configTableView() -> Void {
        StrokeTableView.delegate = self
        StrokeTableView.dataSource = self
        StrokeTableView.rowHeight = 76.0
        StrokeTableView.register(UINib.init(nibName: "MyStrokeCell", bundle: Bundle.main), forCellReuseIdentifier: MyStrokeCellID)
    }
    
    
}

extension MyStrokesController{
    
    
    
    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        print(indexPath.row)
    }
    override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        
  let cell = tableView.dequeueReusableCell(withIdentifier: MyStrokeCellID, for: indexPath as IndexPath) as! MyStrokeCell
        
        return cell;
        
    }
    
    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return 10
    }
    func numberOfSections(in tableView: UITableView) -> Int {
        return 1
    }
    
    
    
}


